package com.meritdata.cloud.data.service.approval.repository;

import com.meritdata.cloud.data.service.datadirectory.entity.TdDownloadPropose;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.repository.query.Param;

import java.util.Date;

public interface TdDownloadProposeRepository extends JpaRepository<TdDownloadPropose, Long>,
        QuerydslPredicateExecutor<TdDownloadPropose> {

    /*@Modifying
    @Query("update  TdDownloadPropose t set t.approveStatus=:approveStatus,t.approveText=:approveText,t.updateTime=:updateTime where t.proposerId=:proposerId")
    void updateApprovalYesInfo(@Param("proposerId") long proposerId,
                               @Param("approveStatus") Integer approveStatus,
                               @Param("approveText") String approveText,
                               @Param("updateTime") Date updateTime);

    @Modifying
    @Query("update  TdDownloadPropose t set t.approveStatus=:approveStatus,t.approveText=:approveText,t.updateTime=:updateTime,t.pressNumber=:pressNumber where t.proposerId=:proposerId")
    void updateApprovalNoInfo(@Param("proposerId") long proposerId,
                              @Param("approveStatus") Integer approveStatus,
                              @Param("approveText") String approveText,
                              @Param("updateTime") Date updateTime,
                              @Param("pressNumber") Integer pressNumber);*/
}
